package test.test;

import context.context.ApplicationContext;
import context.support.ClassPathXmlApplicationContext;
import test.pojo.School;
import test.pojo.Student;
import test.service.SchoolServiceImpl;

public class MainApp {
	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext("application.xml");
		Student student = (Student) context.getBean("student");
		System.out.println(student.getId());
		System.out.println(student.getName());
		System.out.println(student.getSchool().getId());
		System.out.println(student.getSchool().getName());
		
		SchoolServiceImpl schoolServiceImpl = (SchoolServiceImpl) context.getBean("schoolServiceImpl");
		schoolServiceImpl.get();
	}
}
